<%@ page language = "java" contentType="text/html; charset=GBK" %>
<jsp:directive.page import="java.util.Enumeration"/>
<jsp:directive.page import="report.ReportService"/>
<jsp:directive.page import="java.io.OutputStream"/>

<% 
try{
	response.setHeader("Pragma","No-cache"); 
	response.setHeader("Cache-Control","no-cache"); 
	response.setDateHeader("Expires", -10);
	response.setCharacterEncoding("GBK");
	response.reset();
	response.setContentType("application/vnd.ms-excel;");
	
	
	//response.addHeader("Content-Disposition","attachment;filename=report.xls");
	response.setHeader("Accept-ranges", "bytes");
	//String []names=request.getParameterNames();
	Enumeration enu= request.getParameterNames();
	String chinnel=request.getParameter("channels");
	String group=request.getParameter("groups");
	String company=request.getParameter("balance_offices");
	String customers=request.getParameter("customers");
	String year=request.getParameter("year");
	String month=request.getParameter("month");
	
	ReportService report=new ReportService();
	OutputStream out1=response.getOutputStream();
	report.buildReport(group,company,chinnel,customers,year,month,out1);
	out1.flush();
	out1.close();
}catch(Exception e){

}

%>
